<?php
/**
 * DCRM Mobile Page
 *
 * This file is part of WEIPDCRM.
 * 
 * WEIPDCRM is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WEIPDCRM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with WEIPDCRM.  If not, see <http://www.gnu.org/licenses/>.
 */

require_once('system/common.inc.php');
base_url();

// URL For Rewrite 
$rewrite_mod = get_option('rewrite_mod');
switch($rewrite_mod){
	case 3:
		$rewrite_url = array('public' => 'public-%d.html','search' => 'search-mfss.html','public_nohistory' => 'public/%d/nohistory', 'screenshot' => 'screenshot/%d', 'history' => 'history/%d', 'contact' => 'contact/%d', 'pcsection' => 'list-%d.html','7public' => 'public-SevenDay-%d.html','bpublic' => 'public-Halfyear-%d.html','30public' => 'public-OneMonth-%d.html','3public' => 'public-ThreeDay-%d.html','mipublic' => 'list-pg-%d.html','mipcpage' => 'list-%1$d-pg-%2$d.html', 'report' => 'report/%d', 'report_support' => 'report/%1$d/%2$d', 'more' => 'more/%d', 'more_offset' => 'more/%1$d/%2$d', 'misc' => 'misc','down' => 'downloads.html');
		break;
	case 1:
	case 2:
	default:
		$rewrite_url = array('view' => 'index.php?method=view&amp;pid=%d', 'view_nohistory' => 'index.php?pid=%d&amp;addr=nohistory', 'screenshot' => 'index.php?method=screenshot&amp;pid=%d', 'history' => 'index.php?method=history&amp;pid=%d', 'contact' => 'index.php?method=contact&amp;pid=%d', 'section' => 'index.php?method=section&amp;pid=%d', 'report' => 'index.php?method=report&amp;pid=%d', 'report_support' => 'index.php?method=report&amp;pid=%1$d&amp;support=%2$d', 'more' => 'index.php?method=more&amp;pid=%d', 'more_offset' => 'index.php?method=more&amp;pid=%1$d&amp;offset=%2$d', 'misc' => 'misc.php');
		break;
}
function echo_rewrite_url($type, $variable1, $variable2=''){
	global $rewrite_url;
	echo SITE_URL;
	printf($rewrite_url[$type], $variable1, $variable2);
}

class_loader('Mobile_Detect');
$detect = new Mobile_Detect;
if(!$detect->isiOS()){
	if (DCRM_PCINDEX == 1) {
		header("Location: ".SITE_URL.$rewrite_url['misc']);
		exit();
	} else {
		$isCydia = false;
	}
} else {
	if (DCRM_MOBILE == 2) {
		if (!strpos($detect->getUserAgent(), 'Cydia')) {
			$isCydia = false;
		} else {
			$isCydia = true;
		}
	} else {
		exit('Access Denied');
	}
}
if (file_exists('Release')) {
	$release = file('Release');
	$release_origin = __('No Name');
	$release_mtime = filemtime('Release');
	$release_time = date('Y-m-d H:i:s',$release_mtime);
	foreach ($release as $line) {
		if(preg_match('#^Origin#', $line)) {
			$release_origin = trim(preg_replace("#^(.+):\\s*(.+)#","$2", $line));
		}
		if(preg_match("#^Description#", $line)) {
			$release_description = trim(preg_replace("#^(.+):\\s*(.+)#","$2", $line));
		}
	}
} else {
	$release_origin = __('Empty Page');
}
if (isset($_GET['pid'])) {
	if (ctype_digit($_GET['pid']) && intval($_GET['pid']) <= 10000) {
		function device_check(){
			global $detect;
			$device_type = array('iPhone', 'iPod', 'iPad');
			for ($i = 0; $i < count($device_type); $i++) {
				$check = $detect->version($device_type[$i]);
				if ($check !== false) {
					if (isset($_SERVER['HTTP_X_MACHINE'])) {
						$DEVICE = $_SERVER['HTTP_X_MACHINE'];
					} else {
						$DEVICE = 'Unknown';
					}
					$OS = str_replace('_', '.', $check);
					break;
				}
			}
			return array('DEVICE' => $DEVICE, 'OS' => $OS);
		}

		if (isset($_GET['method']) && $_GET['method'] == 'screenshot') {
			$index = 2;
			$title = __('View Screenshots');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'report') {
			$device_info = device_check();
			if (!isset($_GET['support'])) {
				$index = 3;
			} else {
				if ($_GET['support'] == '1') {
					$support = 1;
				} elseif ($_GET['support'] == '2') {
					$support = 2;
				} elseif ($_GET['support'] == '3') {
					$support = 3;
				} else {
					$support = 0;
				}
				$index = 4;
			}
			$title = __('Report Problems');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'history') {
			$index = 5;
			$title = __('Version History');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'contact') {
			$index = 6;
			$title = __('Contact us');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'pcsection') {
			$index = 7;
          $section = DB::fetch_first("SELECT `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections` WHERE `ID` = '".(int)$_GET['pid']."'");
			$title = __(DB::real_escape_string($section['Name']));
		} elseif (isset($_GET['method']) && $_GET['method'] == 'more') {
			$index = 8;
			$section = DB::fetch_first("SELECT `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections` WHERE `ID` = '".(int)$_GET['pid']."'");
			$q_name = DB::real_escape_string($section['Name']);
			if (isset($_GET['offset']) && !empty($_GET['offset']) && ctype_digit($_GET['offset'])) {
				$offset = intval($_GET['offset']);
			} else {
				$offset = 0;
			}
			$packages = DB::fetch_all("SELECT `ID`, `Name`, `Package` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Section` = '".$q_name."') ORDER BY `ID` DESC LIMIT 10 OFFSET ".$offset);
			foreach($packages as $package){
				if(!empty($package)){
					if ($isCydia) { ?>
				<a href="cydia://package/<?php echo($package['Package']); ?>" target="_blank">
<?php					} else { ?>
				<li>
	<a href="<?php echo_rewrite_url('pc', $package['ID']);?>" class="app_icon" >
<?php					} ?>
	
    
<div class="desc" ><?php echo ($package['Description']);  ?></div>
</li>
<?php
				}
			}
			exit();
		} elseif (!isset($_GET['method']) || (isset($_GET['method']) && $_GET['method'] == 'public')) {
			$index = 1;
			$title = __('View Package');
			$package_id = (int)DB::real_escape_string($_GET['pid']);
			$package_info = DB::fetch_first("SELECT `Name`, `Version`, `Author`, `Package`, `Description`, `DownloadTimes`, `Multi`, `CreateStamp`, `Size`, `Installed-Size`, `Section`, `Homepage`, `Tag`, `Level`, `Price`, `Purchase_Link`, `Changelog`, `Changelog_Older_Shows`, `Video_Preview`, `System_Support`, `ScreenShots` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '".$package_id."' LIMIT 1");
			if ($package_info) $title = $package_info['Name'];
		} else {
			httpinfo(405);
			exit();
		}
	} else {
		httpinfo(405);
		exit();
	}
} elseif (!isset($_GET['method'])) {
	$index = 0;
	$title = $release_origin;
} else {
	httpinfo(405);
	exit();
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><?php echo($title); ?> | 最简洁的中文源</title>
		<meta charset="utf-8">
		<meta name="robots" content="index, follow" />
      <mobile:mobile type="pc,mobile"/>
<?php
if (defined("AUTOFILL_SEO")) {
?>
		<meta name="title" content="<?php echo(AUTOFILL_SEO); ?>" />
<?php
}
if (!empty($release_description)) {
?>
		<meta name="description" content="<?php echo($release_description); ?>" />
<?php
}
if (defined("AUTOFILL_KEYWORDS")) {
?>
		<meta name ="keywords" content="<?php echo(AUTOFILL_KEYWORDS); ?>" />
<?php
}
if ($isCydia) {
?>
		<base target="_blank">
<?php
} else {
?>
		<base target="_top">
<?php
}
?>
<link rel="apple-touch-icon" href="<?php echo(SITE_URL); ?>CydiaIcon.png">
<link rel="shortcut icon" href="<?php echo(SITE_URL); ?>favicon.ico">
<link rel="stylesheet" type="text/css" href="<?php echo(SITE_URL); ?>/ziyuan/css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo(SITE_URL); ?>/ziyuan/css/list.css" />
<link rel="stylesheet" type="text/css" href="<?php echo(SITE_URL); ?>/ziyuan/css/rank.css" />
      <script type="text/javascript" src="<?php echo(SITE_URL); ?>/baohu.js"></script>
<script type="text/javascript" src="<?php echo(SITE_URL); ?>/ziyuan/js/postbird-img-glass.js" ></script>
	</head>
	<body class="pinstripe">
		<panel>
<?php
$repo_url = base64_decode(DCRM_REPOURL);
if ($index == 0) {
	if (!$isCydia) {
?>
			 <!-- Global Topbar -->
    <div class="global_topbar_wrap">
		<div id="global_topbar" class="global_topbar">
			<div class="wrap inner">
                    
<?php                                                                 
    if (defined("AUTOFILL_PCDBZDYMC1") or defined("AUTOFILL_PCDBZDY1") or defined("AUTOFILL_ZTMHDZ1") or defined("AUTOFILL_ZTMHDZMC1") or defined("AUTOFILL_YYWXZQ1") or defined("AUTOFILL_YYWXZQMC1") or defined("AUTOFILL_YYZJBB1") or defined("AUTOFILL_YYZJBBMC1") or defined("AUTOFILL_WLPJHZ1") or defined("AUTOFILL_WLPJHZMC1")) {
?>              
				<div class="services" id="global_topbar_services">
					<ul>
<?php
                                                                   
    if (defined("AUTOFILL_PCDBZDY1") && defined("AUTOFILL_PCDBZDYMC1")) {
?>                        
                    <li class="current"><a href="<?php echo(AUTOFILL_PCDBZDY1); ?>"><i class="weiphone"></i><?php echo(AUTOFILL_PCDBZDYMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_ZTMHDZ1") && defined("AUTOFILL_ZTMHDZMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_ZTMHDZ1); ?>" target="_blank"><i class="wegame"></i><?php echo(AUTOFILL_ZTMHDZMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_YYZJBB1") && defined("AUTOFILL_YYZJBBMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_YYZJBB1); ?>" target="_blank"><i class="fengbuy"></i><?php echo(AUTOFILL_YYZJBBMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_WLPJHZ1") && defined("AUTOFILL_WLPJHZMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_WLPJHZ1); ?>" target="_blank"><i class="wper"></i><?php echo(AUTOFILL_WLPJHZMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_YYWXZQ1") && defined("AUTOFILL_YYWXZQMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_YYWXZQ1); ?>" ><i class="weand"></i><?php echo(AUTOFILL_YYWXZQMC1); ?></a></li>
                     
<?php
	}
?>						
                     
					</ul>
					<a href="javascript:;" class="expand"><span>展开</span></a>
				</div>               
<?php
	}
?>	              
				<div class="links" id="globar_topbar_links">
					<ul>
						<li><a href="<?php echo(SITE_URL); ?>" target="_blank">首页</a></li>
<?php
	if (defined("AUTOFILL_PCDBZDY") && defined("AUTOFILL_PCDBZDY_NAME")) {
?>              
			<li><a href="<?php echo(AUTOFILL_PCDBZDY); ?>" target="_blank"><?php echo(AUTOFILL_PCDBZDY_NAME); ?></a></li> 
<?php
	}
?> 
					</ul>
					<div class="focus"><em></em></div>
				</div>
                <div class="user_menu">
				<ul>
<?php
require_once 'qqlogin/function.php';
require_once 'qqlogin/Connect2.1/qqConnectAPI.php';	
?>                  
<?php if(!isset($_SESSION["accesstoken"]) || !isset($_SESSION["openid"])) { ?>
		<li><a href="/qqlogin/qqlogin.php">登录</a></li>        
<?php } else { 
    $qc = new QC($_SESSION["accesstoken"],$_SESSION["openid"]);
    $arr = $qc->get_user_info();           
?>  
                <li><img class="icon" src="<?php echo $arr['figureurl_qq_2'];?>" style="border-radius: 50%; width: 20px; height: 20px; box-shadow:0 0 1px #AAA;padding:1px;margin-right: 1px;"></li>
                <li>用户名：<?php echo $arr['nickname'];?></li>  
				<li><a href="User.php" target="_blank">个人中心</a></li>
                <li><a onclick="cookipost()" >退出登录</a></li>  
 <script language="javascript">
    function cookipost(){
      $.get("/qqlogin/qqlogout.php", function(result){
    	location.reload();
  	  });  
	}
</script>                  
<?php
}
?> 
                  
      
 <?php 
if(isset($_SESSION["accesstoken"]) || isset($_SESSION["openid"])) {      
$User=$arr["nickname"];
$Logo=$arr['figureurl_qq_2'];
$Openid=$_SESSION["openid"];
$date=date("Y-m-d h:i:s");
$ip = ($ip) ? $ip : $_SERVER["REMOTE_ADDR"];   
if($row=DB::result_first("SELECT * FROM `".DCRM_CON_PREFIX."User` WHERE `Openid`='".$Openid."'" )){    
  $sql = DB::query("UPDATE `".DCRM_CON_PREFIX."User` SET `Logo` = '".$Logo."', `User` = '".$User."',`IP` = '".$ip."' WHERE `Openid`='".$Openid."'");
} else {  
  $query = DB::query("INSERT INTO `".DCRM_CON_PREFIX."User` (ID,User,Logo,Openid,Packages,Collection,TimeStamp,IP) VALUES ('','$User','$Logo','$Openid','','','$date','$ip')");
}      
}
?>  
                 
				</ul>
			    </div>
			</div>
		</div>
	</div> 
          <!-- Header -->
<div class="header_wrap">
	<div id="header" class="header">
		<div class="wrap_con header_inner">
			<h2><a href="<?php echo(SITE_URL); ?>"><?php echo(AUTOFILL_SEO); ?></a></h2>
			<div class="navigator">
				<ul>
					<li >
						<a href="<?php echo(SITE_URL); ?>">
							<i class="home"></i><span>首页</span>
						</a>
					</li>
					<li >
						<a href="<?php echo(SITE_URL); ?>public.html">
							<i class="list"></i><span>资源列表</span>
						</a>
					</li>
<?php
	if (defined("AUTOFILL_PCZDYDH") && defined("AUTOFILL_PCZDYDH_NAME")) {
?>                   
					<li >
						<a href="<?php echo(AUTOFILL_PCZDYDH); ?>">
							<i class="rank"></i><span><?php echo(AUTOFILL_PCZDYDH_NAME); ?></span>
						</a>
					</li>
<?php
    }                                                                     
    if (defined("AUTOFILL_PCZDYDH2") && defined("AUTOFILL_PCZDYDH2_NAME")) {
?>                   
					<li >
					     <a href="<?php echo(AUTOFILL_PCZDYDH2); ?>" >
						<i class="me"></i><span><?php echo(AUTOFILL_PCZDYDH2_NAME); ?></span>
                         </a>
					</li>
                           
<?php
    }                                                                     
?>   
				</ul>
			</div>
		</div>
	</div>
</div>           
<!-- 变化开始 -->
<!-- main4 -->
<!--资源列表-->
<div class="resource_list clearfix">
	<div class="wrap_con">
		<h1>资源列表</h1>
		<div class="platform">
			<a href="" class="current">
			<em class="iphone" title="iPhone">iPhone</em> 
			<em class="ipad" title="iPad">iPad</em></a>
			<a href="" >
			<em class="iphone" title="iPhone">iPhone</em></a>
			<a href="" >
			<em class="ipad" title="iPad">iPad</em></a>
		</div>
      <!--列表内容展示-->
<div class="search_box">
				<form action="search.php" method="get" >	
					<span class="txt">
						<input class="input" type="text" name="name"  placeholder="搜索你想要的" required="required" />
					</span>
					<span class="btn"><button type="submit" id="search_btn"><i></i>搜索</button></span>
				</form>
			</div>
	</div>
</div>
<?php
	}
?>
      <div class="resource_con clearfix">
	<div class="wrap_con">
		<div class="classify clearfix">				
			<div class="type_box bule_line">
				<div class="rank_sort">分类列表</div>
				<div class="soft_link">
					<a href="http:<?php echo(SITE_URL); ?>public.html" class="current" >全部分类</a>

<?php

		$sections = DB::fetch_all("SELECT `ID`, `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections`");
		foreach($sections as $section){
?> 
		<a href="<?php echo_rewrite_url('pcsection', $section['ID']); ?>">[<?php echo($section['Name']); ?>]</a>
<?php
		}
?>
			
                  
</div>			
</div>                 
<?php
	$num = DB::result_first("SELECT count(*) FROM `".DCRM_CON_PREFIX."Packages` WHERE  (`Stat` = '1' AND (to_days(now())-to_days(CreateStamp))<=30) ");
?>
<?php
	$down = DB::result_first("SELECT SUM(`DownloadTimes`)FROM `".DCRM_CON_PREFIX."Packages` WHERE `Stat` = '1'");
?>
			<div class="type_box green_line">
				<div class="rank_sort">资源排序</div>
				<div class="soft_link">
				<a href="<?php echo(SITE_URL); ?>public.html" class="current" >最新上传</a>
                 <a href="<?php echo(SITE_URL); ?>downloads.html" class="current" >最多下载</a>
                <a href="https:<?php echo(SITE_URL); ?>public-list-iOS9.html" class="current" >IOS9分类</a>
                <a href="https:<?php echo(SITE_URL); ?>public-list-iOS10.html" class="current" >IOS10分类</a>
                <a href="https:<?php echo(SITE_URL); ?>public-list-iOS11.html" class="current" >IOS11分类</a>
                <a href="https:<?php echo(SITE_URL); ?>public-list-iOSClass.html" class="current" >IOS应用分类</a>
			</div>
            </div>
            <div class="type_box orage_line">
			     <div class="rank_sort">更新时间</div>
			     <div class="soft_link">
			     <a href="<?php echo(SITE_URL); ?>public.html"  >不限</a>
				 <a href="<?php echo(SITE_URL); ?>public-ThreeDay.html"  >三天内</a>
				 <a href="<?php echo(SITE_URL); ?>public-SevenDay.html"  >一周内</a>
				 <a href="<?php echo(SITE_URL); ?>public-OneMonth.html"  >一个月内</a>
				 <a href="<?php echo(SITE_URL); ?>public-Halfyear.html"  >半年内</a>
			</div>  
			</div> 
				<div class="type_box red_line">
				<div class="rank_sort">资源总量</div>
				<div class="soft_link">
				<a class="current" >30天内共更新<?php printf( $num ); ?> 个软件包</a> 
			</div>
		</div>
</div>

<div id="app_list" class="app_list">
<ul class="clearfix">	            


 <?php 
function news($pageNum = 1, $pageSize = 9)
{
    $array = array();
    $coon = mysqli_connect("localhost", "s7420423", "kui203061");
    mysqli_select_db($coon, "s7420423");
    mysqli_set_charset($coon, "utf8");
    // limit为约束显示多少条信息，后面有两个参数，第一个为从第几个开始，第二个为长度
    $rs = "select `ID`, `Name`,`Icon2`, `Section`, `SectionID`,  `Description`,`DownloadTimes`,`Package` from apt_Packages WHERE (`Stat` = '1' AND (to_days(now())-to_days(CreateStamp))<=30) ORDER BY `CreateStamp` DESC limit " . (($pageNum - 1) * $pageSize) . "," . $pageSize;
    $r = mysqli_query($coon, $rs);
    while ($obj = mysqli_fetch_object($r)) {
        $array[] = $obj;
    }

    return $array;
}
?> 
<?php  
  function allNews()
{
    $coon = mysqli_connect("localhost", "s7420423", "kui203061");
    mysqli_select_db($coon, "s7420423");
    mysqli_set_charset($coon, "utf8");
    $rs = "SELECT count(*) num FROM apt_Packages WHERE (`Stat` = '1' AND (to_days(now())-to_days(CreateStamp))<=30)"; //可以显示出总页数    
    $r = mysqli_query($coon, $rs);
    $obj = mysqli_fetch_object($r);

    return $obj->num;
}

   $allNum = allNews();
   $pageSize = 9; //约定每页显示的信息条数
   $pageNum = empty($_GET["pageNum"])?1:$_GET["pageNum"];
   $endPage = ceil($allNum/$pageSize); //总页数
   $array = news($pageNum,$pageSize);
  $url=SITE_URL;
?> 
<div id="app_list" class="app_list">
<ul class="clearfix">			
<?php
    foreach($array as $key=>$values){  
?> 

  	<li>
	<a href="<?php echo_rewrite_url('public', $values->ID);?>" class="app_icon" >     
      <img class="icon" src="<?php echo(SITE_URL); ?>icon/<?php echo($values->Icon2); ?>" height="118" width="118" alt="图标图片"/ >
	  <img src="<?php echo(SITE_URL); ?>ziyuan/picture/<?php echo($values->Icon2); ?>.jpg" height="118" width="118" class="bg" alt="背景图片" />
		<em class="add" ></em><i class="mask"></i><i class="tag"><em class="deb">deb</em></i>
	</a>
	<a href="<?php echo_rewrite_url('public', $values->ID);?>" class="tit" ><p><?php echo($values->Name); ?></p></a>
	<span class="type"><a href="<?php echo_rewrite_url('pcsection', $values->SectionID);?>" >[ <?php echo($values->Section); ?> ]</a></span>
		<div class="props">
		<span class="platform">
		<em class="iphone" title="iPhone">iPhone</em>
		<em class="ipad" title="iPad">iPad</em>
	</span>
<?php
	$numsc = DB::result_first("SELECT count(*) FROM `".DCRM_CON_PREFIX."Collection` WHERE `Package`='".$values->Package."'");
?> 
 <span class="count">下载次数<em><?php echo($values->DownloadTimes); ?></em>次</span><span class="pipe">/</span><span class="count">收藏次数<em><?php echo($numsc); ?></em>次</span>          
</div>      
<div class="desc" ><?php echo($values->Description); ?></div>
</li>
<?php
}
?>
<li class="fix"></li>
</ul>
  <br>
</div>  
</div></div>
<?php	
   }
?>

<div class="pager">
<div class="page_list">
<div class="pagin">

<a href="<?php echo_rewrite_url('30public', '1');?>">首页</a>  
<a href="<?php echo_rewrite_url('30public', $pageNum==1?1:($pageNum-1));?>">上一页</a> 
<span class='current'><?php echo $pageNum ?>/<?php echo ($endPage)?></span>
<a href="<?php echo_rewrite_url('30public', $pageNum==$endPage?$endPage:($pageNum+1));?>">下一页</a>
<a href="<?php echo_rewrite_url('30public', $endPage);?>">尾页</a>
</div></div></div>
 



  
<!-- footer -->
<!--随便看看-->
    <div class="footer">
      <div class="wrap_con">
        <h3>旗下网站</h3>
        <div class="footer_nav">
			<a href="http://mycydia.vip" target="_blank">博客</a>
			|
			<a href="<?php echo(SITE_URL); ?>" target="_blank">Cydia源</a>
			|
			<a class="hint-new" href="http:<?php echo(SITE_URL); ?>/help/9.php" target="_blank">版权与免责声明</a>
		</div>
		<p><a href="http://www.miitbeian.gov.cn/" target="_blank">
          <?php if(defined("AUTOFILL_FOOTER_CODE")){ ?>
					<?php echo(stripslashes(AUTOFILL_FOOTER_CODE));?> </a></p>
		  <?php } ?>

        
		<p><a  style="color: #c0392b;" >Copyright <?php printf( __( 'Copyright &copy; %s' ) , defined("AUTOFILL_FOOTER_YEAR") ? htmlspecialchars(stripslashes(AUTOFILL_FOOTER_YEAR)).'-'.date("Y") : date("Y") ); ?>  http:<?php echo(SITE_URL); ?> ®. All rights reserved. <?php echo(AUTOFILL_SEO); ?>版权或产权保护</a></p>
	</div>
    </div>
        
<div class="bottom_fix">
<!--返回顶部-->
<a href="javascript:;" class="go_top" id="go_top_btn">返回顶部</a>
</div>
   <?php
	if (defined("AUTOFILL_BAIDUTJ")) {
?>
<?php echo(AUTOFILL_BAIDUTJ); ?>
  <?php
	}
?> 
<script type="text/javascript" src="<?php echo(SITE_URL); ?>ziyuan/js/jquery-1.7.min.js" ></script>
<script type="text/javascript" src="<?php echo(SITE_URL); ?>ziyuan/js/common.js"></script>
<script>
        PostbirdImgGlass.init({
            domSelector:".img-container img",
            animation:true
        });
</script>
<script type="text/javascript" >
//global options
var STATIC_URL = '<?php echo(SITE_URL); ?>';
$.ajaxSetup({ cache:true });
ds.Dialog.defaults.iconBasePath = 'ziyuan/images/';

//Navigator autoFixed
$.getScript(STATIC_URL + 'ziyuan/js/jquery.autoFixed.js', function(){
	$('#header').autoFixed();
});

//返回顶部
jQuery(function($){
	var timer, view = $(window), btn = $('#go_top_btn');

	function scrollHandler(){
		clearTimeout(timer);
		timer = setTimeout(checkScroll, 160);
	}
	function checkScroll(){
		var top = view.scrollTop();
		btn[top > 100 ? 'removeClass' : 'addClass']('hide');
	}

	btn.bind('click', function(){
		btn.addClass('hide');
		ds.scrollTo(0);
	});
	view.bind('scroll', scrollHandler);
	scrollHandler();
});
</script>	

<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
		
	</body>
</html>
